package grape.house.rest.estate.mvc;

import grape.house.service.estate.api.IEstateService;
import grape.house.service.estate.po.Estate;
import grape.common.rest.advice.DisableGRB;
import grape.common.rest.advice.DisableGRM;
import grape.common.rest.mvc.SuperController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * <p>
 * 楼盘内部调用接口
 * </p>
 *
 * @author yangwei
 * @since 2019-9-28
 */
@RestController
@RequestMapping("/house/estate")
@ApiIgnore
public class EstateInnerController extends SuperController {
    @Autowired
    private IEstateService iEstateService;

    @DisableGRM
    @DisableGRB
    @GetMapping("/inner/trans/support")
    public boolean support(String type){
        return iEstateService.support(type);
    }
    @DisableGRM
    @DisableGRB
    @GetMapping("/inner/trans")
    public String trans(String type,String key){
        return iEstateService.trans(type,key);
    }


    @DisableGRM
    @DisableGRB
    @GetMapping("/inner/getEstateById")
    public Estate getEstateById(String id){
        return iEstateService.getById(id);
    }

    @DisableGRM
    @DisableGRB
    @GetMapping("/inner/getEstateByCode")
    public Estate getEstateByCode(String code){
        return iEstateService.getByCode(code);
    }

}
